package juc.demo3;


import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;

//class myThread implements Callable<Integer> {
//
//    @Override
//    public Integer call() throws Exception {
//        System.out.println("********call()*********");
//        return 200;
//    }
//}

public class CallableDemo {
    public static void main(String[] args) {

        FutureTask<Integer> ft = new FutureTask<Integer>(() -> {
            System.out.println("********call()*********");
            return 200;
        });
        new Thread(ft, "A").start();

    }
}
